//
// Created by YE on 2024/1/3.
//

#ifndef YCH_INTERPRETER_YCH_OBJECT_H
#define YCH_INTERPRETER_YCH_OBJECT_H

#include "ych.h"
#include "ych_string.h"
typedef YCH_INT Int;
typedef YCH_FLOAT Float;
typedef YCH_STRING String;

struct Mat {
    unsigned int m, n;
    Float **mat;
};


union Value {
    unsigned int p;    //
    Int i;
    Float f;
    Mat *mat;
    YString* str;
    bool b;
};
enum Ot {
    Ot_None,
    Ot_Int,
    Ot_Float,
    Ot_Bool,
    Ot_Mat,
    Ot_String,
    Ot_T,
};
struct Object {
    Ot t;
    Value v;
};

#endif //YCH_INTERPRETER_YCH_OBJECT_H
